package com.ice.chatserver.dao;

import com.ice.chatserver.pojo.GroupUser;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
* @author ice2020x
* @Date: 2023/2/3
* @Description: 群聊用户操作
**/
@Repository
public interface GroupUserDao extends MongoRepository<GroupUser, String> {

    /**
     * 查询分组根据用户id和分组id
     * @param userId 用户id
     * @param groupId groupId
     * @return GroupUser 分组用户信息
     */
    GroupUser findGroupUserByUserIdAndGroupId(String userId, String groupId);
}